package com.dragon.common.domain.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Collection;

/**
 * 分页响应数据
 *
 * @author dragon
 * @version 1.0
 * @date 2024/7/30 14:38
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "分页响应数据")
public class PaginationVo<T> {

    /**
     * 分页页数
     */
    @Builder.Default
    @Schema(description = "分页页数")
    private Integer pageNum = 1;

    /**
     * 分页条数
     */
    @Builder.Default
    @Schema(description = "分页条数")
    private Integer pageSize = 10;

    /**
     * 总条数
     */
    @Builder.Default
    @Schema(description = "总条数")
    private Integer total = 0;

    /**
     * 数据列表
     */
    @Schema(description = "数据列表")
    private Collection<T> rows;

}
